
#include <QtCore>
#include <QCoreApplication>
#include <qtconcurrentmap.h>
#include <FileSearch.h>
#include <ResultCollector.h>

int main ( int argc, char *argv[] )
{
	QCoreApplication app ( argc, argv );
	//qDebug("Hello from Qt 4!");

	QStringList list("/home");
	//list << "/usr/local/Trolltech" << "/home";

	ResultCollector *result = new ResultCollector();
	FileSearch search ( list,result );
	

	QTime time;
	time.start();
	qDebug() << QTime::currentTime().toString ( "hh::mm::ss::zzz" );	
	search.search();

	while(search.isRunning())
	{
		
	}
	
	qDebug() << QTime::currentTime().toString ( "hh::mm::ss::zzz" );	
	
	qDebug() << time.elapsed();
	//QStringList files = findFiles("../../", QStringList() << "*.cpp" << "*.h");
	result->print();
	return 0;
}

